package com.hopedove.returnyarnsystem.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

import com.hopedove.base.BaseActivity;
import com.hopedove.returnyarnsystem.R;
import com.hopedove.utils.CommonUtil;

public class ReturnYarnMainActivity extends BaseActivity implements OnClickListener {
    private TextView versionTv;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_return_yarn_main);

        findViewById(R.id.createcall).setOnClickListener(this);
        findViewById(R.id.confirmcall).setOnClickListener(this);
        findViewById(R.id.queryBatchnoImg).setOnClickListener(this);

        versionTv = findViewById(R.id.versionTv);
        versionTv.setText("版本：V" + CommonUtil.getAppVersionName(this));
    }


    @Override
    public void onClick(View v) {
        int id = v.getId();

        if (id == R.id.createcall) {   //
            Intent intent = new Intent(this, InputJTActivity.class);
            startActivity(intent);
        } else if (id == R.id.confirmcall) { // 确认呼叫
            Intent intent = new Intent(this, ScanBarcodeActivity.class);
            startActivity(intent);
        } else if (id == R.id.queryBatchnoImg) {
            Intent intent = new Intent(this, InputBatchNoActivity.class);
            startActivity(intent);
        }
    }

}
